﻿USE KwaiXiaoDianDB;
GO


--商品店铺表新增评分相关字段
--店铺综合分
if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='summary_score')
begin
	ALTER TABLE dbo.t_product_shop ADD summary_score DECIMAL(18,2) NULL;
END
GO

if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='summary_rank')
begin
	ALTER TABLE dbo.t_product_shop ADD summary_rank DECIMAL(18,2) NULL;
END
GO

if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='summary_level')
begin
	ALTER TABLE dbo.t_product_shop ADD summary_level NVARCHAR(4) NULL;
END
GO

--商品体验分
if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='product_score')
begin
	ALTER TABLE dbo.t_product_shop ADD product_score DECIMAL(18,2) NULL;
END
GO

if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='product_level')
begin
	ALTER TABLE dbo.t_product_shop ADD product_level NVARCHAR(4) NULL;
END
GO

--物流体验分
if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='express_score')
begin
	ALTER TABLE dbo.t_product_shop ADD express_score DECIMAL(18,2) NULL;
END
GO

if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='express_level')
begin
	ALTER TABLE dbo.t_product_shop ADD express_level NVARCHAR(4) NULL;
END
GO

--售后服务分
if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='service_score')
begin
	ALTER TABLE dbo.t_product_shop ADD service_score DECIMAL(18,2) NULL;
END
GO

if not exists(select * from syscolumns where id=object_id('t_product_shop') and name='service_level')
begin
	ALTER TABLE dbo.t_product_shop ADD service_level NVARCHAR(4) NULL;
END
GO


